﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class Customer_Login : System.Web.UI.Page
{
    CustormerMethord CM = new CustormerMethord();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        DataTable dt = CM.Cuslogin(txtUserName.Text, txtPassword.Text);
        if (dt.Rows.Count > 0)
        {
            Session["UserName"] = txtUserName.Text;
            Response.Redirect("Home.aspx");
        }
        else {
            lblMsg.Text = "UserName or Password isn't Valid ";
        }
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Response.Redirect("Register.aspx");
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        Response.Redirect("RegainPassword.aspx");
    }
}